]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
[shellDBus] Avoid sending undefined over DBus
authorColin Walters <walters@verbum.org>
Thu, 12 Nov 2009 23:17:58 +0000 (18:17 -0500)
committerColin Walters <walters@verbum.org>
Fri, 13 Nov 2009 17:45:46 +0000 (12:45 -0500)
DBus doesn't have a notion of null/undefined, so do the lame
thing and return the empty string.

js/ui/shellDBus.js

index 1d998efffa7d01fd34e73eb5e050c0ba56ce05b2..8ff743eccd65cc9cf1727c6079c3e22670ad3a35 100644 (file)
@@ -48,6 +48,9 @@ GnomeShell.prototype = {
         let success;
         try {
             returnValue = JSON.stringify(eval(code));
+            // A hack; DBus doesn't have null/undefined
+            if (returnValue == undefined)
+                returnValue = "";
             success = true;
         } catch (e) {
             returnValue = JSON.stringify(e);